package com.tencent.qqpay.sdk;

import org.apache.http.client.HttpClient;

/**
 * 常量.
 * @see com.github.wxpay.sdk.WXPayConstants
 */
public class QQPayConstants {
    
    /** 签名算法. */
    public enum SignType {
        MD5
    }
    
    /** QQ支付API域名. */
    public static final String DOMAIN_API = "https://qpay.qq.com";
    
    /** 统一下单[不需要商户证书,HTTPS,POST,UTF-8]. */
    public static final String UNIFIEDORDER_URL_SUFFIX = "/cgi-bin/pay/qpay_unified_order.cgi";
    /** 订单查询[不需要商户证书,HTTPS,POST,UTF-8]. */
    public static final String ORDERQUERY_URL_SUFFIX   = "/cgi-bin/pay/qpay_order_query.cgi";
    /** 关闭订单[不需要商户证书,HTTPS,POST,UTF-8]. */
    public static final String CLOSEORDER_URL_SUFFIX   = "/cgi-bin/pay/qpay_close_order.cgi";
    /** 申请退款[需要商户证书,HTTPS,POST,UTF-8]. */
    public static final String REFUND_URL_SUFFIX       = "/cgi-bin/pay/qpay_refund.cgi";
    /** 退款查询[不需要商户证书,HTTPS,POST,UTF-8]. */
    public static final String REFUNDQUERY_URL_SUFFIX  = "/cgi-bin/pay/qpay_refund_query.cgi";
    /** 对账单下载[不需要商户证书,HTTPS,POST,UTF-8]. */
    public static final String DOWNLOADBILL_URL_SUFFIX = "/cgi-bin/sp_download/qpay_mch_statement_down.cgi";
    
    /** 失败[FAIL]. */
    public static final String FAIL     = "FAIL";
    /** 成功[SUCCESS]. */
    public static final String SUCCESS  = "SUCCESS";
    
    /** 签名字段名称[sign]. */
    public static final String FIELD_SIGN = "sign";
    /** 签名字段类别[sign_type]. */
    public static final String FIELD_SIGN_TYPE = "sign_type";
    /** 加密方式[MD5]. */
    public static final String MD5 = "MD5";
    
    /** QQ支付SDK版本. */
    public static final String QQPAYSDK_VERSION = "QQPaySDK/0.0.1";
    /** QQ支付用户标识.  */
    public static final String USER_AGENT = QQPAYSDK_VERSION +
            " (" + System.getProperty("os.arch") + " " + System.getProperty("os.name") + " " + System.getProperty("os.version") +
            ") Java/" + System.getProperty("java.version") + " HttpClient/" + HttpClient.class.getPackage().getImplementationVersion();

}
